---@class Table_SceneClassItem
local Table_SceneClassItem = BaseClass("Table_SceneClassItem", IDataItem)

function Table_SceneClassItem:__ctor()
	---@type number @唯一ID
	self.Id = 0
	---@type string @名称
	self.Name = ""
	---@type string @场景图片
	self.SceneImg = ""
	---@type string @场景图集
	self.SceneAtlas = ""
	---@type string @场景资源
	self.SceneName = ""
	---@type string @资源名称
	self.ResName = ""
	---@type number @副本类型
	self.SceneType = 0
	---@type number @地表高度最大值
	self.TerrainHeightMax = 0
	---@type string @地表场景大小
	self.MapSize = ""
	---@type string @地表高度图大小
	self.TerrainMap = ""
	---@type string @雷达图片大小
	self.SceneMap = ""
	---@type string @雷达地图资源
	self.SceneMapTexture = ""
	---@type number[] @入口坐标
	self.Entry_Pos = {}
	---@type number[] @安全坐标
	self.Safe__Pos = {}
	---@type number @背景音乐ID
	self.BGMusic = 0
	---@type number[] @界面ID
	self.PanelId = {}
end

function Table_SceneClassItem:Load(reader)
	self.temp = reader:ReadShortString()
	self.Id = tonumber(self.temp)
	self.Name = reader:ReadString()
	self.SceneImg = reader:ReadString()
	self.SceneAtlas = reader:ReadString()
	self.SceneName = reader:ReadString()
	self.ResName = reader:ReadString()
	self.temp = reader:ReadShortString()
	self.SceneType = tonumber(self.temp)
	self.temp = reader:ReadShortString()
	self.TerrainHeightMax = tonumber(self.temp)
	self.MapSize = reader:ReadString()
	self.TerrainMap = reader:ReadString()
	self.SceneMap = reader:ReadString()
	self.SceneMapTexture = reader:ReadString()
	self.temp = reader:ReadShortString()
	self.Entry_Pos = Utility.StringToNumbers(self.temp)
	self.temp = reader:ReadShortString()
	self.Safe__Pos = Utility.StringToNumbers(self.temp)
	self.temp = reader:ReadShortString()
	self.BGMusic = tonumber(self.temp)
	self.temp = reader:ReadShortString()
	self.PanelId = Utility.StringToNumbers(self.temp)
end

---@class Table_SceneClassMgr : IDataMgr
local this = BaseClass("Table_SceneClassMgr", IDataMgr)

function this:FileName()
	return "Txt/SceneClass.txt"
end

---@return Table_SceneClassItem
function this:GetItemByKey(key)
	return self.super.GetItemByKey(self, key)
end

---@return Table_SceneClassItem
function this:GetItemByIdx(idx)
	return self.super.GetItemByIdx(self, idx)
end

function this:Load(reader)
	local item = Table_SceneClassItem()
	item:Load(reader)
	self.mItemDic[item.Id] = self.mDataCount
	table.insert(self.mItemList, item)
end

---@type Table_SceneClassMgr
Table_SceneClassMgr = this()